package com.topfinance.cnaps2.dto;

import java.io.Serializable;
import java.sql.Timestamp;

import com.topfinance.frame.util.StringUtil;

public class TblTxLineDto implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2265046076065094999L;
	private String oper;
	private Timestamp ts;
	private String dir;
	private String host;
	private String partner;
	private String status;
	private String inport;
	private String outport;
	private String desc;
	private String paired = "N";

	public TblTxLineDto() {
		super();
	}

	public TblTxLineDto(String oper, Timestamp ts, String dir, String host, String partner, String status) {
		super();
		this.oper = oper;
		this.ts = ts;
		this.dir = dir;
		this.host = host;
		this.partner = partner;
		this.status = status;
	}
	
	public TblTxLineDto(String oper, Timestamp ts, String dir, String host, String partner, String status,
			String inport, String outport) {
		super();
		this.oper = oper;
		this.ts = ts;
		this.dir = dir;
		this.host = host;
		this.partner = partner;
		this.status = status;
		this.inport = inport;
		this.outport = outport;
	}

	public String getOper() {
		return oper;
	}

	public void setOper(String oper) {
		this.oper = oper;
	}

	public String getShortTs() {
		return StringUtil.convertShortTimes(ts);
	}
	public String getLongTs() {
		return StringUtil.convertTimestamp(ts);
	}

	public void setTs(Timestamp ts) {
		this.ts = ts;
	}

	public String getDir() {
//		if("D".equals(dir))
//			return "来帐下行";
//		else
//			return "往帐上行";
		return dir;
	}

	public void setDir(String dir) {
		this.dir = dir;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getPartner() {
		return partner;
	}

	public void setPartner(String partner) {
		this.partner = partner;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getInport() {
		return inport;
	}

	public void setInport(String inport) {
		this.inport = inport;
	}

	public String getOutport() {
		return outport;
	}

	public void setOutport(String outport) {
		this.outport = outport;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getPaired() {
		return paired;
	}

	public void setPaired(String paired) {
		this.paired = paired;
	}

}
